package mysql

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	OrderSn     string  `gorm:"type:char(36)"`
	UserId      int64   `gorm:"type:int"`
	GoodsId     int64   `gorm:"type:int"`
	OrderAmount float64 `gorm:"type:decimal(10,2)"`
	OrderStatus int64   `gorm:"type:tinyint(1)"`
	Payment     int64   `gorm:"type:tinyint(1);"`
}

func (o *Order) OrderList() (list []*Order, err error) {
	DB.Debug().Find(&list)
	return
}
